//
//  secondtoforhead.m
//  xiaoyiNew
//
//  Created by 讯一 on 16/12/30.
//  Copyright © 2016年 讯一. All rights reserved.
//

#import "secondtoforhead.h"

@implementation secondtoforhead
- (instancetype)initWithFrame:(CGRect)frame img:(UIImage*)img title:(NSString*)title
{
    self = [super initWithFrame:frame];
    if (self) {
        [self layoutSubviews];
        _im = img;
        _text = title;
    }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    
    UILabel *line = [[UILabel alloc]initWithFrame:CGRectMake(Screen_Width/3 - 10, self.frame.size.height/2.0, Screen_Width/2.8, 2)];
    line.backgroundColor = [UIColor grayColor];
    [self addSubview:line];
    self.contentView.backgroundColor = [UIColor whiteColor];
    UIImageView *iii = [[UIImageView alloc]initWithFrame:CGRectMake(Screen_Width/3.3, 5, 20, 20)];
    [iii setImage:_im];
    [self addSubview:iii];
    
    UILabel *uil = [[UILabel alloc]initWithFrame:CGRectMake(Screen_Width/2.2+5, 5, Screen_Width/3, 20)];
    uil.text = _text;
    [self addSubview:uil];
    
    
    

}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
